Relational and object-relational database management systems store information in tables of rows. To retrieve data, queries that request data are submitted to a database server, which computes the queries and returns the data requested.
Queries submitted to the database server must conform to the syntactical rules of a particular query language. One popular query language, known as the Structured Query Language (SQL), provides users a variety of ways to specify information to be retrieved.
Queries submitted to a database server are evaluated by a query optimizer. Based on the evaluation, the query optimizer generates an execution plan that defines steps for executing the query. Typically, the query optimizer generates an execution plan optimized for efficient execution.
Several problems can arise with execution plans generated by query optimizers. First, the execution plans may not generate the correct the results. Second, an optimizer execution plan may in fact perform poorly.
Determining the root cause of problems with execution plans can be very complicated and tedious. In fact, even detecting such problems can be difficult.
Based on the foregoing, there is a clear need for developing techniques that facilitate detecting and solving problems with execution plans.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.